package com.exchange.View;

import android.content.Context;
import android.view.View;
import android.widget.ImageView;
import android.widget.ListView;
import android.widget.TextView;
import com.exchange.Controller.ExchangeDataRequestListener;
import com.exchange.Controller.a;
import com.exchange.Public.ExchangeConstants;
import com.exchange.Public.n;
import com.exchange.View.a.c;
import com.exchange.b.a;
import java.util.List;

class ai
  implements ExchangeDataRequestListener
{
  public void dataReceived(int paramInt, List<a> paramList)
  {
    while (true)
    {
      try
      {
        if (x.b(x.a.a(this.a)) != null)
          x.c(x.a.a(this.a)).setVisibility(4);
        if (paramInt == 0)
          break label293;
        localList = x.a(x.a.a(this.a), paramList);
        if ((localList != null) && (localList.size() > 0))
        {
          x.d(x.a.a(this.a)).addAll(localList);
          x.e(x.a.a(this.a)).a(localList);
          Context localContext = x.f(x.a.a(this.a));
          x localx = x.a.a(this.a);
          int i = 1 + x.g(localx);
          x.a(localx, i);
          new a(localContext, 0, localList, 7, i, 0).start();
          return;
        }
        n.c(ExchangeConstants.LOG_TAG, "Failed to request next page.");
        x.a(x.a.a(this.a)).setOnScrollListener(null);
        x.h(x.a.a(this.a)).clearAnimation();
        x.h(x.a.a(this.a)).setVisibility(8);
        if (x.b(x.a.a(this.a)) == null)
          return;
        x.c(x.a.a(this.a)).setVisibility(0);
        x.b(x.a.a(this.a)).setText(c.f(x.f(x.a.a(this.a))));
        x.c(x.a.a(this.a)).setOnClickListener(new G(this));
      }
      catch (Exception localException)
      {
        n.c(ExchangeConstants.LOG_TAG, localException.getMessage());
      }
      return;
      label293: List localList = null;
    }
  }
}